<template>
    <div class="right-wrapper content-myAnalysis">
        <div class="page-titles">
            <div class="col-md-5">
                <h3 class="text-themecolor">评估报表</h3>
            </div>
        </div>
        <div class="container-fluid">
        	<div class="row">
        		<div class="col-md-6">
                    <div class="card">
                        <div class="card-body">
                            <h4 class="card-title">
                                <p>评估分为：<span>26分</span></p>
                                <p>全站最高分为：<span>100分</span></p>
                            </h4>
                            <div class="text-center">
                                图表
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="card">
                        <div class="card-body">
                            <h4 class="card-title">
                                <p>总做题量：<span>{{stats.question.mycount}}道</span></p>
                                <p>全站最高为：<span>{{stats.question.allcount}}道</span></p>
                            </h4>
                            <div class="text-center">
                                图表
                            </div>
                        </div>
                    </div>
                </div>
        	</div>
            <div class="row">
                <div class="col-md-6">
                    <div class="card">
                        <div class="card-body">
                            <h4 class="card-title">
                                <p>总正确率为：<span>18.33%</span></p>
                                <p>全站最高为：<span>100%</span></p>
                            </h4>
                            <div class="text-center">
                                图表
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="card">
                        <div class="card-body">
                            <h4 class="card-title">
                                <p>昨天做题量为：<span>0道</span></p>
                                <p>全站最高为：<span>2418道</span></p>
                            </h4>
                            <div class="text-center">
                                图表
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    import http from "../../lib/http"
    export default {
        data : function(){
            return {
                stats : {
                    question : {
                        mycount : 0,
                        allcount : 0
                    }
                }
            }
        },
        created : function () {
            var self = this
            http.alive(this,function(){
                self.questionCount()
            })
        },
        methods : {
            questionCount : function(){
                var self = this
                http.get(this,"stat/myquestion").then(function(res){
                    self.stats.question.mycount =  res.data.data.mycount
                    self.stats.question.allcount = res.data.data.allcount
                })
            }
        }

    }
</script>
